home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 38 / Amiga Format CD38 (1999-03-15)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-04].iso / -seriously_amiga- / misc / ced_html / html / html_subparagraph.ced < prev    next >
Text File  |  1999-01-25  |  3KB  |  80 lines

  1. /*
  2. ** html_subparagraph.ced
  3. **
  4. ** $VER: html_subparagraph.ced 1.0 (12.02.1998)
  5. **
  6. ** Arexx script for HTML v3.2 sub paragraph stucture
  7. **
  8. ** This script works with CygnusEd Professional v4.2
  9. **
  10. ** Copyright © Eric BELLE
  11. */
  12.  
  13. /*
  14. **------------------------------------------------------------------------------
  15. **    Initialisation
  16. **------------------------------------------------------------------------------
  17. */
  18.  
  19. OPTIONS RESULTS                            /* Tell CygnusEd to return results. */
  20. NL = '0A'X                                    /* Alias for new line. */
  21. KRETURN = RAWKEY 68                    /* Shortcut to the return key. */
  22. KTAB = RAWKEY 66                        /* Shortcut to the tab key. */
  23. STATUS TABSARESPACES                /* Return TAB mode ("tab" or "space"). */
  24. IF RESULT = 1                                /* Test the TAB mode. */
  25. THEN "TABS = SPACES"                /* Switch TAB mode from "space" to "tab". */
  26. ELSE NOP                                        /* No operation. */
  27. TAB SIZE 1                                    /* Set TAB size proportional to 2 spaces. */
  28.  
  29. /*
  30. **------------------------------------------------------------------------------
  31. **    Sub Paragraph position
  32. **------------------------------------------------------------------------------
  33. */
  34.  
  35. SubParagraphMode = "q"
  36. DO WHILE ~(SubParagraphMode="l" | SubParagraphMode="c",
  37.                     | SubParagraphMode="r",
  38.                     | SubParagraphMode=" " | SubParagraphMode="RESULT")
  39.     GETSTRING "c" '"SubParagraph position: (l)eft, (c)enter, (r)ight ?"'
  40.     SubParagraphMode = RESULT
  41. END
  42.  
  43. IF (SubParagraphMode="RESULT" | SubParagraphMode=" ")
  44. THEN EXIT 0
  45. ELSE NOP
  46.  
  47. /*
  48. **------------------------------------------------------------------------------
  49. **    Html sub paragraph marks
  50. **------------------------------------------------------------------------------
  51. */
  52.  
  53. OpenSubParagraph = "<DIV"
  54. CloseSubParagraph = "</DIV>"
  55.  
  56. SELECT
  57.     WHEN (SubParagraphMode="c") THEN SubParagraphPosition = " ALIGN=CENTER>"
  58.     WHEN (SubParagraphMode="r") THEN SubParagraphPosition = " ALIGN=RIGHT>"
  59.     WHEN (SubParagraphMode="l") THEN SubParagraphPosition = " ALIGN=LEFT>"
  60.     OTHERWISE NOP
  61. END
  62.  
  63. /*
  64. **------------------------------------------------------------------------------
  65. **    Html sub paragraph structure
  66. **------------------------------------------------------------------------------
  67. */
  68.  
  69. TEXT OpenSubParagraph || SubParagraphPosition ; "AUTO-INDENT" ; KTAB
  70. TEXT "Should be modified - SubParagraph" ; "AUTO-INDENT" ; BACKTAB
  71. TEXT CloseSubParagraph
  72.  
  73. /*
  74. **------------------------------------------------------------------------------
  75. **    End of html_subparagraph.ced Arexx script
  76. **------------------------------------------------------------------------------
  77. */
  78.  
  79. EXIT 0
  80.